[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VALTIME(SEXP) (BOOLEAN)
Function
Tests a string for time format validity.
Syntax
VALTIME(sexp)
sexp = Any string expression.
Return Type & Value
BOOLEAN
Returns TRUE if the string is a valid time format, FALSE otherwise.
Remarks
PPL does it best to convert incompatible types, as needed,
automatically. Converting a STRING type to a TIME type is particularly
problematic because of the virtually unlimited numbers of strings
possible. This function checks to make sure that the hour is from 0 to
23, the minute is from 0 to 59, and the second (optional) is from 0 to 59.
Also, each field (hours/minutes/seconds) must be separated by a colon.
If the string matches these requirements then the string is considered
valid and TRUE is returned. Any other string will result in a FALSE
value being returned.
Examples
STRING s
WHILE (!VALTIME(s)) DO
INPUT "Time",s
NEWLINES 2
ENDWHILE
TIME t
LET t = s
PRINTLN s," ",t
See Also:
VALCC()
VALDATE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson